<template>
	<view class="body-item">
		<view class="handle">
			<view class="buser">
				<u-avatar :size="100" :src="likeItem.userUrl"></u-avatar>
				<view class="info">
					<view class="name">{{likeItem.userName}}</view>
					<block v-if="type=='comm'">
						<view class="time">{{likeItem.time}}</view>
					</block>
				</view>
			</view>
			<view class="content">
				<bloc v-if="type=='comm'">
					回复 {{likeItem.buser.userName}}: {{likeItem.comm}}
				</bloc>
				<block v-else>
					点赞了你的帖子
				</block>
			</view>
		</view>
		<view class="comm">
			<view class="header">
				<view class="left">
					<u-avatar :size="80" :src="likeItem.buser.userUrl"></u-avatar>
					<view class="name">{{likeItem.buser.userName}}</view>
				</view>
				<view class="right">
					{{likeItem.infoTime}}
				</view>
			</view>
			<view class="title">【{{likeItem.infoType|get_infoType}}】{{likeItem.infoTitle}}</view>
			<view class="info">
				{{likeItem.infoComm}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: {
			likeItem: Object,
			type: String
		}
	}
</script>

<style lang="scss">
	.body-item {
		padding-bottom: 20upx;
		border-bottom: 1upx solid #CCCCCC;

		.handle {
			padding: 20upx;
			padding-bottom: 10upx;

			.buser {
				display: flex;
				align-items: center;

				.info {
					font-size: 24upx;
					margin-left: 25upx;

					.time {
						line-height: 35upx;
					}
				}
			}

			.content {
				font-size: 24upx;
				margin-top: 15upx;
			}
		}

		.comm {
			padding: 20upx;
			background-color: rgb(213, 213, 213);
			height: 240upx;

			.header {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.left {
					display: flex;
					align-items: center;
					font-size: 24upx;

					.name {
						margin-left: 20rpx;
					}

				}

				.right {
					font-size: 24upx;

					.title {
						margin-left: 20upx;
					}
				}
			}

			.title {
				font-size: 24upx;
				margin-top: 20upx;
			}

			.info {
				margin-top: 10upx;
				line-height: 40upx;
				// text-indent: 2em;
				font-size: 20upx;
				text-overflow: -o-ellipsis-lastline;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				line-clamp: 2;
				-webkit-box-orient: vertical;
				height: 80upx;
				overflow: hidden;
				padding-left: 30upx;
				padding-right: 100upx;
			}
		}
	}
</style>
